pub fn new_birthday_probability(n: u32) -> f64 {
    if n < 2 {
        return 0.0; // 至少需要两个人
    }
    
    let mut probability_no_shared_birthday = 1.0;
    
    for i in 0..n {
        probability_no_shared_birthday *= (365 - i) as f64 / 365.0;
    }
    
    // 计算至少有两个人同一天过生日的概率
    1.0 - probability_no_shared_birthday
}
